package com.example.test630;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class OtherActivity extends AppCompatActivity {
    private EditText infoEt;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_other);
        infoEt = findViewById(R.id.info_edit);
    }

    public void fetchInfo(View view) {
        String info = infoEt.getText().toString();
        Intent intent = getIntent();
        intent.putExtra("info",info);
        setResult(1,intent);
        finish();
    }
}
